package service;

import java.sql.SQLException;
import java.util.List;

import dao.PhoneDao;
import model.PhoneInfo;
import model.PhoneModelInfo;

public class PhoneService {
	public List<PhoneInfo> getPhoneBrandList() throws SQLException {
		PhoneDao phoneDao = new PhoneDao();
		return phoneDao.getPhoneBrandList();
	}
	public PhoneModelInfo getPhonePriceAndReviews(String phoneModelName) throws SQLException {
		PhoneDao phoneDao = new PhoneDao();
		return phoneDao.getPhonePriceAndReviews(phoneModelName);
	} 
	public List<PhoneModelInfo> getPhoneNameList() throws SQLException{
		PhoneDao phoneDao = new PhoneDao();
		return phoneDao.getPhoneNameList();
	}
	public boolean updatePhonePrice(String phoneName,int phonePrice) throws SQLException{
		PhoneDao phoneDao = new PhoneDao();
		return phoneDao.updatePhonePrice(phoneName, phonePrice);
	}
}
